#include <iostream>
#include <cstring>

#define NAMESIZE	32

using namespace std;

class Person {
    private:
        int id;
        char *name;
        int age;

    public:
        Person(int id, const char *name, int age);
        void show();

};

class Worker {
    private:
        int wId;
        char *job;

    public:
        Worker(int wId, const char *job);
        void show();
};


Person::Person(int id, const char *name, int age): id(id), age(age)
{
    this->name = new char[NAMESIZE];
    strncpy(this->name, name, NAMESIZE);
}

void Person::show()
{
    cout << "id = " << id << ", name = " << name << ", age = " << age << endl;
}

Worker::Worker(int wId, const char *job): wId(wId)
{
    this->job = new char[NAMESIZE];
    strncpy(this->job, job, NAMESIZE);
}

int main(void)
{
    Person p1(1, "小白", 13);

    p1.show();

    return 0;
}
